import pyautogui as pg
import os
import time
import pyperclip
import requests
import json
import psutil
import sys
import win32gui
import win32con
import win32process  
import ctypes
from pywinauto.application import Application




error = win32gui.FindWindow(None, "错误")

app = Application(backend='uia').connect(handle=error)
message_box = app.window(handle=win32gui.GetWindowText(error))
print(message_box.print_control_identifiers())